package com.galaxy.device.domain.convert;

import com.galaxy.device.domain.DeviceBase;
import com.galaxy.device.domain.bo.DeviceBaseBo;
import com.galaxy.device.domain.vo.DeviceBaseVo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 设备基础信息对象转换器
 */
@Mapper
public interface DeviceBaseConvert {

    DeviceBaseConvert INSTANCE = Mappers.getMapper(DeviceBaseConvert.class);

    /**
     * 实体转BO
     */
    DeviceBaseBo convert(DeviceBase bean);

    /**
     * 实体列表转BO列表
     */
    List<DeviceBaseBo> convertList(List<DeviceBase> list);

    /**
     * 实体转VO
     */
    DeviceBaseVo convertVo(DeviceBase bean);

    /**
     * 实体列表转VO列表
     */
    List<DeviceBaseVo> convertVoList(List<DeviceBase> list);

    /**
     * BO转实体
     */
    DeviceBase convert(DeviceBaseBo bo);

    /**
     * BO列表转实体列表
     */
    List<DeviceBase> convertListBo(List<DeviceBaseBo> list);

    DeviceBaseBo convert(DeviceBaseVo vo);
}
